home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C & C++ Multimedia Cyber Classroom
/
C and C++ Multimedia Cyber Classroom (Prentice Hall) (1998).iso
/
src
/
fig03_21.jar
/
Ch03
/
Fig03_21
/
Fig03_21.cpp
Wrap
C/C++ Source or Header
|
1997-10-11
|
298b
|
15 lines
// Fig. 3.21: fig03_21.cpp
// References must be initialized
#include <iostream.h>
int main()
{
int x = 3, &y = x; // y is now an alias for x
cout << "x = " << x << endl << "y = " << y << endl;
y = 7;
cout << "x = " << x << endl << "y = " << y << endl;
return 0;
}